<template>
  <svg-icon class="back" name="back" @click="goBack"/>
</template>

<script>
import { useRouter } from 'vue-router'
import { Toast } from 'vant'

export default {
  name: 'Back',
  setup() {
    const router = useRouter()
    const goBack = () => {
      Toast(`无操作权限\n请前往 ‘我的’ 充值开通会员`)
      router.go(-1)
    }

    return {
      goBack
    }
  }
}
</script>

<style lang="scss" scoped>
.back {
  position: absolute;
  top: 27px;
  left: 24px;
  z-index: 1;
  width: 8px;
  height: 13px;
  color: #fff;
  &::after {
    content: '';
    position: absolute;
    top: -20px;
    bottom: -20px;
    left: -20px;
    right: -20px;
  }
}
</style>